package tn.softcom.dfbuilder.modele;

public class RapportADJI implements Comparable<RapportADJI>,Cloneable{
	
	private String PLMN;
	private String Source_RNC_Name;
	private String Source_WBTS_Name;
	private String Source_WCEL_Name;
	private String Source_WCEL_adjacencies;
	private String Source_WCEL_LCR_ID;
	private String Source_WCEL_ID;
	private String Target_RNC_Name;
	private String Target_WBTS_Name;
	private String Target_WCEL_Name;
	private String Target_WCEL_LCR_ID;
	private String Target_WCEL_ID;
	private String Neighbor;
	private String Att;
	private String Share;
	private String SR_per_adjacency;
	private String Avg_CPICH; 
	private String Avg_CPICH_RSCP;
	private String idToRetreve;
	
	private GpsData gpsData;
	private Double distanceWithSource;
	
	
	public String getPLMN() {
		return PLMN;
	}
	public void setPLMN(String pLMN) {
		PLMN = pLMN;
	}
	public String getSource_RNC_Name() {
		return Source_RNC_Name;
	}
	public void setSource_RNC_Name(String source_RNC_Name) {
		Source_RNC_Name = source_RNC_Name;
	}
	public String getSource_WBTS_Name() {
		return Source_WBTS_Name;
	}
	public void setSource_WBTS_Name(String source_WBTS_Name) {
		Source_WBTS_Name = source_WBTS_Name;
	}
	public String getSource_WCEL_Name() {
		return Source_WCEL_Name;
	}
	public void setSource_WCEL_Name(String source_WCEL_Name) {
		Source_WCEL_Name = source_WCEL_Name;
	}
	public String getSource_WCEL_adjacencies() {
		return Source_WCEL_adjacencies;
	}
	public void setSource_WCEL_adjacencies(String source_WCEL_adjacencies) {
		Source_WCEL_adjacencies = source_WCEL_adjacencies;
	}
	public String getSource_WCEL_LCR_ID() {
		return Source_WCEL_LCR_ID;
	}
	public void setSource_WCEL_LCR_ID(String source_WCEL_LCR_ID) {
		Source_WCEL_LCR_ID = source_WCEL_LCR_ID;
	}
	public String getSource_WCEL_ID() {
		return Source_WCEL_ID;
	}
	public void setSource_WCEL_ID(String source_WCEL_ID) {
		Source_WCEL_ID = source_WCEL_ID;
	}
	public String getTarget_RNC_Name() {
		return Target_RNC_Name;
	}
	public void setTarget_RNC_Name(String target_RNC_Name) {
		Target_RNC_Name = target_RNC_Name;
	}
	public String getTarget_WBTS_Name() {
		return Target_WBTS_Name;
	}
	public void setTarget_WBTS_Name(String target_WBTS_Name) {
		Target_WBTS_Name = target_WBTS_Name;
	}
	public String getTarget_WCEL_Name() {
		return Target_WCEL_Name;
	}
	public void setTarget_WCEL_Name(String target_WCEL_Name) {
		Target_WCEL_Name = target_WCEL_Name;
	}
	public String getTarget_WCEL_LCR_ID() {
		return Target_WCEL_LCR_ID;
	}
	public void setTarget_WCEL_LCR_ID(String target_WCEL_LCR_ID) {
		Target_WCEL_LCR_ID = target_WCEL_LCR_ID;
	}
	public String getTarget_WCEL_ID() {
		return Target_WCEL_ID;
	}
	public void setTarget_WCEL_ID(String target_WCEL_ID) {
		Target_WCEL_ID = target_WCEL_ID;
	}
	public String getNeighbor() {
		return Neighbor;
	}
	public void setNeighbor(String neighbor) {
		Neighbor = neighbor;
	}
	public String getAtt() {
		return Att;
	}
	public void setAtt(String att) {
		Att = att;
	}
	public GpsData getGpsData() {
		return gpsData;
	}
	public void setGpsData(GpsData gpsData) {
		this.gpsData = gpsData;
	}
	public String getShare() {
		return Share;
	}

	public Double getDistanceWithSource() {
		return distanceWithSource;
	}
	public void setDistanceWithSource(Double distance) {
		this.distanceWithSource = distance;
	}
	public void setShare(String share) {
		Share = share;
	}
	public String getSR_per_adjacency() {
		return SR_per_adjacency;
	}
	public void setSR_per_adjacency(String sR_per_adjacency) {
		SR_per_adjacency = sR_per_adjacency;
	}
	
	
	@Override
	public int compareTo(RapportADJI o) {
		int result =  Double.valueOf(Att).compareTo(Double.valueOf(o.getAtt()));
		if(result == 0)
			result = Double.valueOf(Avg_CPICH).compareTo(Double.valueOf(o.getAvg_CPICH()));
		if(result == 0)
			result =  Double.valueOf(Avg_CPICH_RSCP).compareTo(Double.valueOf(o.getAvg_CPICH_RSCP())) ;
		if( o.getDistanceWithSource()!=null && distanceWithSource!=null){
			if(result == 0)
				result =  o.getDistanceWithSource().compareTo(distanceWithSource);
			}
		return result;
	}
	public String getIdToRetreve() {
		return idToRetreve;
	}
	public void setIdToRetreve(String idToRetreve) {
		this.idToRetreve = idToRetreve;
	}
	
	public String getAvg_CPICH() {
		return Avg_CPICH;
	}
	public void setAvg_CPICH(String avg_CPICH) {
		Avg_CPICH = avg_CPICH;
	}
	public String getAvg_CPICH_RSCP() {
		return Avg_CPICH_RSCP;
	}
	public void setAvg_CPICH_RSCP(String avg_CPICH_RSCP) {
		Avg_CPICH_RSCP = avg_CPICH_RSCP;
	}
	@Override
	public String toString() {
		return "Rapport [Att=" + Att + ", Avg_CPICH=" + Avg_CPICH
				+ ", Ec_No_CPICH_RSCP_SHO=" + Avg_CPICH_RSCP + "]";
	}
	
	
	
	public Object clone() {
    	Object o = null;
    	try {
      		o = super.clone();
    	} catch(CloneNotSupportedException cnse) {
      		cnse.printStackTrace(System.err);
	    }
	    return o;
  	}
	


}
